﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Quanlynhasach.hethongluutru;
using Quanlynhasach.hethongxuly;
using System.Data;

namespace Quanlynhasach.hethongluutru
{
    class BaoCaoCongNoDAO
    {
        public static void Insert(BaoCaoCongNoDTO bcnDTO)
        {
            string sql = "insert into BaoCaoCongNo(MaKhachHang,NgayPhatSinh,NoDau,PhatSinh,NoCuoi) values(" + bcnDTO.MaKhachHang + ",'" + bcnDTO.NgayPhatSinh + "'," + bcnDTO.NoDau + ",'" + bcnDTO.PhatSinh + "'," + bcnDTO.NoCuoi + ")";
            database.ExcuNonQuery(sql);
        }
        public static DataTable BaoCaoThang(int thang)
        {
            string sql = "select * from BaoCaoCongNo where Month(NgayPhatSinh) like '%" + thang + "%' ";
            return database.ExcuQuery(sql);
        } 
    }
}
